The follow snippet might be useful during debugging to list the properties inside an ## prints out the property names for a bean #macro (describeBean $name) #set($bu = $webwork.bean("com.opensymphony.util.BeanUtils")) #foreach($propName in $bu.getPropertyNames($name)) <li>$propName</li> #end #end i.e. assuming $obj is a PersonObject that has properties(firstName, lastName, and zip). #describeBean($obj) would print One might also expand upon this to build a dynamic interface with via reflection. e.g. $webwork.evalute("$obj.${propName}")
|